package com.lyf.service;

import java.util.List;

import com.lyf.dao.InformationDao;
import com.lyf.pojo.Information;

public class InformationService {

	private InformationDao dao;

	public void save(Information i){
		dao.saveOrUpdate(i);
	}
	
	public List<Information> findAll(){
		return dao.findAll(); 
	}
	
	public List<Information> findAllById(String id){
		return dao.findAllByProjectId(id);
	}
	
	public Information findById(String id){
		return dao.get(id);
	}
	
	//set
	public void setDao(InformationDao dao) {
		this.dao = dao;
	}

	//delete
	public void deleteById(String id) {
		dao.delete(id);
	}
	
}
